package com.ouheng.shop.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

import com.ouheng.shop.dao.AdDao;
import com.ouheng.shop.domain.AdDO;
import com.ouheng.shop.service.AdService;



@Service
public class AdServiceImpl implements AdService {
	@Autowired
	private AdDao adDao;
	
	@Override
	public AdDO get(Long id){
		return adDao.get(id);
	}
	
	@Override
	public List<AdDO> list(Map<String, Object> map){
		return adDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return adDao.count(map);
	}
	
	@Override
	@Transactional
	public int save(AdDO ad){
		return adDao.save(ad);
	}
	
	@Override
	@Transactional
	public int update(AdDO ad){
		return adDao.update(ad);
	}
	
	@Override
	@Transactional
	public int remove(Long id){
		return adDao.remove(id);
	}
	
	@Override
	@Transactional
	public int batchRemove(Long[] ids){
		return adDao.batchRemove(ids);
	}
	
}
